package com.lwy.springbootdemo01.service;


import com.lwy.springbootdemo01.bean.Fruit;
import com.lwy.springbootdemo01.mapper.Fruitmapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class FruitService {

//    注入
    @Autowired
    private Fruitmapper fruitmapper;

   //查询

    public Fruit querybyig(String id){

        Fruit queryfruit = fruitmapper.queryfruit(id);
        return queryfruit;
    }

    //新增
    @Transactional
    public void insertfruit(){
        System.out.println("新增");
    }

}
